IProfSect
: IMAPIProp
The IProfSect
interface is used to work with the properties of profile section objects.
Quick Info
Header
file: |
MAPIX.H |
Exposed by: |
Profile
section objects |
Implemented
by: |
MAPI |
Called by: |
Client
applications and service providers |
Corresponding
pointer type: |
LPPROFSECT |
Transaction
model: |
Non-transacted |
Vtable Order
No unique
methods
Required
properties |
Access |
PR_OBJECT_TYPE |
Read-only |
PR_PROFILE_NAME |
Read-only |
Notes to Callers
IProfSect does not have any unique methods of its own, but you
can call the profile section s IMAPIProp methods. There are some
differences between the IProfSect implementation and other
implementations of IMAPIProp:
IProfSect does not support
a transaction model.
IProfSect does not
support named properties.
IProfSect reserves the
identifier range 0X67F0 to 0X67FF for secure properties.
Not
supporting a transaction model means that all changes made to a profile section
following calls to the IMAPIProp::CopyProps and IMAPIProp::CopyTo
methods occur immediately. Calls to the IMAPIProp::SaveChanges method
succeed, but don t actually save any changes.
To protect
from having changes occur prematurely, service providers need to make copies of
their profile sections that are displayed to users through property sheets. The
property sheets should work with the copy, rather than the real profile section.
When the user has verified that the changes are accurate by choosing the OK
button, the changes can be saved to the real profile section.
{bmc bm4.MRB} To implement a property sheet with a copied profile section
1. Open the profile section by calling IMAPISupport::OpenProfileSection
or IProviderAdmin::OpenProfileSection .
2. Call CreateIProp to retrieve a property
data object, an object that supports the IPropData interface.
3. Call the profile section s IMAPIProp::CopyTo method to copy the
properties to appear on the property sheet from the profile section to the
property data object.
4. Call IMAPISupport::DoConfigPropSheet to request that the service
provider display a property sheet and pass a pointer to the property data
object in the lpConfigData parameter.
5. When the user saves changes to configuration
properties in the property sheet, call the IMAPIProp::CopyTo method to copy the
properties from the property data object back to the profile section.
Profile
sections, unlike other objects, do not support named properties. IMAPIProp::GetIDsFromNames
and IMAPIProp::GetNamesFromIDs return MAPI_E_NO_SUPPORT if called on a
profile section object. Attempts to set properties with identifiers in the
range above 0x8000 with IMAPIProp::SetProps return PT_ERROR as the
property type.
Profile
sections reserve the identifier range 0X67F0 to 0X67FF for secure properties.
Service providers can use this range to store passwords and other provider-specific
credentials. Properties in this range are not returned in the complete list of
properties when NULL is passed in the lpPropTag parameter of the IMAPIProp::GetProps
method, nor are they returned in the lppPropTagArray parameter of the IMAPIProp::GetPropList
method. Secure properties must be requested specifically by their identifiers.
MAPI
furnishes a profile section with the hard-coded constant MUID_PROFILE_INSTANCE
as its identifier and PR_SEARCH_KEY
For more
information on using profile sections, see Profile Administration